package com.xjk.education.service.impl;

import java.util.List;
import com.xjk.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xjk.education.mapper.EduProgrammesMapper;
import com.xjk.education.domain.EduProgrammes;
import com.xjk.education.service.IEduProgrammesService;

/**
 * 课程信息Service业务层处理
 * 
 * @author xjk
 * @date 2024-07-20
 */
@Service
public class EduProgrammesServiceImpl implements IEduProgrammesService 
{
    @Autowired
    private EduProgrammesMapper eduProgrammesMapper;

    /**
     * 查询课程信息
     * 
     * @param programmesId 课程信息主键
     * @return 课程信息
     */
    @Override
    public EduProgrammes selectEduProgrammesByProgrammesId(Long programmesId)
    {
        return eduProgrammesMapper.selectEduProgrammesByProgrammesId(programmesId);
    }

    /**
     * 查询课程信息列表
     * 
     * @param eduProgrammes 课程信息
     * @return 课程信息
     */
    @Override
    public List<EduProgrammes> selectEduProgrammesList(EduProgrammes eduProgrammes)
    {
        return eduProgrammesMapper.selectEduProgrammesList(eduProgrammes);
    }

    /**
     * 新增课程信息
     * 
     * @param eduProgrammes 课程信息
     * @return 结果
     */
    @Override
    public int insertEduProgrammes(EduProgrammes eduProgrammes)
    {
        eduProgrammes.setCreateTime(DateUtils.getNowDate());
        return eduProgrammesMapper.insertEduProgrammes(eduProgrammes);
    }

    /**
     * 修改课程信息
     * 
     * @param eduProgrammes 课程信息
     * @return 结果
     */
    @Override
    public int updateEduProgrammes(EduProgrammes eduProgrammes)
    {
        eduProgrammes.setUpdateTime(DateUtils.getNowDate());
        return eduProgrammesMapper.updateEduProgrammes(eduProgrammes);
    }

    /**
     * 批量删除课程信息
     * 
     * @param programmesIds 需要删除的课程信息主键
     * @return 结果
     */
    @Override
    public int deleteEduProgrammesByProgrammesIds(Long[] programmesIds)
    {
        return eduProgrammesMapper.deleteEduProgrammesByProgrammesIds(programmesIds);
    }

    /**
     * 删除课程信息信息
     * 
     * @param programmesId 课程信息主键
     * @return 结果
     */
    @Override
    public int deleteEduProgrammesByProgrammesId(Long programmesId)
    {
        return eduProgrammesMapper.deleteEduProgrammesByProgrammesId(programmesId);
    }
}
